package com.sunyard.dal.bo.org;

import com.sunyard.constant.manage.RegexConst;
import com.sunyard.dal.bo.BaseBO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author jiy.fang
 * @ClassName OrganizationUpdateBO
 * @Description 机构修改BO
 * @date 2019/7/18 20:06
 */

@Data
@ApiModel
public class OrganizationUpdateBO extends BaseBO {

    private static final long serialVersionUID = 8533185733596354022L;

    private Integer id;

    /**
     * 机构码
     */
    @ApiModelProperty(value = "机构码", required = true)
    @NotBlank(message = "机构码不能为空")
    @Pattern(regexp = RegexConst.ORG_ID, message = "机构码只能是6为纯数字")
    private String orgId;

    /**
     * 机构名称
     * 由1-40位中文、字母、数字组合，名称不能重复
     */
    @ApiModelProperty(value = "机构名称", required = true)
    @Size(max = 40)
    @NotBlank(message = "机构名称不能为空")
    @Pattern(regexp = RegexConst.ORG_NAME_GEGEX, message = "机构名称由1-40位中文、字母、数字组合")
    private String orgName;

    /**
     * 上级机构
     */
    @ApiModelProperty(value = "上级机构", required = true)
    private String orgPid;

    /**
     * 机构等级
     */
    @ApiModelProperty(value = "机构等级", required = true)
    private String orgLevel;

    /**
     * 机构类型
     */
    @ApiModelProperty(value = "机构类型", required = true)
    private String orgType;

    /**
     * 围栏范围开关
     */
    @ApiModelProperty(value = "围栏范围开关")
    private String orgRailSwitch;

    /**
     * 机构备注
     */
    @ApiModelProperty(value = "机构备注")
    private String orgRemark;

    /**
     * 工作时间 按周设置(周一到周日对应 1-7 逗号隔开){"date":"1,2,3,4,5","startTime":"13:01:22","endTime":"14:22:22"}
     */
    @ApiModelProperty(value = "工作时间", required = true)
    private OrgWorkingTimeBO orgWorkingTime;

    @ApiModelProperty("注册省份")
    @NotBlank(message = "注册省份不能为空")
    private String proCode;

    @ApiModelProperty("注册城市")
    @NotBlank(message = "注册城市不能为空")
    private String ctCode;

    @ApiModelProperty("注册区县")
    private String disCode;

    @ApiModelProperty("详细地址")
    private String orgAddr;
}
